<!doctype html>
<html>
<head>
	<title>{% block title %}Система электронных дневников{% endblock %}</title>
	<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/paginator3000.css" />
  <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/print.css" media="print" />
  
  <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/datepicker.css" /> 
  <link type="text/css" href="{{ MEDIA_URL }}css/blitzer_/jquery-ui-1.7.2.custom.css" rel="stylesheet" />  
  <script type="text/javascript" src="{{ MEDIA_URL }}js/jquery-1.3.2.min.js"></script>
  <script type="text/javascript" src="{{ MEDIA_URL }}js/jquery-ui-1.7.2.custom.min.js"></script> 
  
	<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/default.css" media="screen" />
	<script type="text/javascript" src="{{ MEDIA_URL }}js/paginator3000.js"></script>
	<script type="text/javascript" src="{{ MEDIA_URL }}js/all.js"></script>
  <script type="text/javascript">
    $(function(){
      options = {
        inline: true,
        dateFormat: 'dd.mm.y',
        dayNames: ['Воскресенье', 'Понедельник', 'Вторник', 'Среда', 'Четверг', 'Пятница', 'Суббота'],
        dayNamesMin: ['Вс', 'Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб'],
        monthNames: ['Январь', 'Февраль', 'Март', 'Апрель', 'Май', 'Июнь', 'Июль', 'Август', 'Сентябрь', 'Октябрь', 'Ноябрь', 'Декабрь'],
        monthNamesShort: ['Янв', 'Фев', 'Мар', 'Апр', 'Май', 'Июн', 'Ил', 'Авг', 'Сен', 'Окт', 'Ноя', 'Дек'],
        firstDay: 1,
      }
      $('#id_date').datepicker(options);
    });
  </script>
	<style>
/*
		body{
			font-family: Verdana, Tahoma;
		}
		.content{
			width: 90%;
			height: 100%;
		}
		td.topmenu a, span{
			padding: 0px 20px;
			border-width: 0 1px;
			border-style: solid;
			border-color: gray;
			margin: 0px;
		}
		td.topmenu{
			text-align: right;
		}
		td.left{
			width: 10%;
			background-color: #FFFFCF;
		}
		table.form{
			text-align: left;
		}
		td{
			vertical-align: top;
		}
		td.left ul{padding: 0px;}
		td.left li{
			list-style: none;
			padding: 3px 0px 3px 5px;
		}

*/	</style>

</head>
<body>
	<div id="topmenu">
		{% block topmenu %}{% endblock %}
	</div>
    <div id="navigation">
        <div id="sidebar">
            <div id="menu">
				{{ user.fio }} ({{ user.username }})
            	{% ifequal user.prefix "t" %} 
					<ul>
						{% if user.subjects and not ROOT_CAN_ALL or user.is_administrator %}
							<li{% if not DIR %}{% ifequal ACTIVE_URL "marks" %} class="active"{% endifequal %}{% endif %}><a href="/marks/">Выставление отметок</a>
								{% ifequal ACTIVE_URL "marks" %}
									<ul>
									{% if subjects %}
										<li{% ifequal DIR "lesson" %} class="active"{% endifequal %}><a href="/marks/lesson/">Уроки</a></li>
										<li{% ifequal DIR "grade" %} class="active"{% endifequal %}><a href="/marks/grade/">Отметки</a></li>
										<li{% ifequal DIR "result" %} class="active"{% endifequal %}><a href="/marks/result/">Итоговые отметки</a></li>
									{% endif %}
									</ul>
								{% endifequal %}
							</li>
						{% endif %}
						{% if user.grade %}
							<li{% if not DIR %}{% ifequal ACTIVE_URL "curatorship" %} class="active"{% endifequal %}{% endif %}><a href="/curatorship/">Классное руководство</a>
								{% ifequal ACTIVE_URL 'curatorship' %}
									<ul>
										<li{% ifequal DIR "connections" %} class="active"{% endifequal %}><a href="/curatorship/connections/">Связки</a></li>
										<li{% ifequal DIR "pupil" %} class="active"{% endifequal %}><a href="/curatorship/pupil/">Ученики</a></li>
										<li{% ifequal DIR "pupil_passwords" %} class="active"{% endifequal %}><a href="/curatorship/pupil_passwords/">Пароли учеников</a></li>
										<li{% ifequal DIR "graphiks" %} class="active"{% endifequal %}><a href="/curatorship/graphiks/">Аналитика</a></li>
									</ul>
								{% endifequal %}
							</li>
						{% endif %}
						{% if user.is_administrator %}
							<li{% if not DIR %}{% ifequal ACTIVE_URL "administrator" %} class="active"{% endifequal %}{% endif %}><a href="/administrator/">Администрирование</a>
								{% ifequal ACTIVE_URL 'administrator' %}
									<ul>
										<li{% ifequal DIR "teacher" %} class="active" {% endifequal %}><a href="/administrator/uni/teacher/">Учителя</a></li>
										<li{% ifequal DIR "pupil" %} class="active" {% endifequal %}><a href="/administrator/uni/pupil/">Учащиеся</a></li>
										<li{% ifequal DIR "subject" %} class="active" {% endifequal %}><a href="/administrator/uni/subject/">Дисциплины</a></li>
										<li{% ifequal DIR "grade" %} class="active" {% endifequal %}><a href="/administrator/uni/grade/">Классы</a></li>
										<li{% ifequal DIR "resultdate" %} class="active" {% endifequal %}><a href="/administrator/uni/resultdate/">Итоги</a></li>
									</ul>
								{% endifequal %}
							</li>
							<li{% ifequal path "attendace" %} class="active"{% endifequal %}><a href="/attendance/">Расписания</a>{% block attendance_menu %}{% endblock %}</li>
						{% endif %}
					</ul>
				{% endifequal %}
            	{% ifequal user.prefix "p" %} 
					<ul>
						<li{% ifequal ACTIVE_URL "marks" %} class="active"{% endifequal %}><a href="/marks/">Отметки</a>
							{% ifequal ACTIVE_URL 'marks' %}
								<ul>
									{% for subject in subjects %}
										<li{% ifequal DIR subject.id %} class="active"{% endifequal %}><a href="/marks/subject/{{ subject.id }}/">{{ subject.name }}</a></li>
									{% endfor %}
								</ul>
							{% endifequal %}
						</li>
					</ul>
				{% endifequal %}
				<ul style="padding-top: 15px;">
					<li><a href="/accounts/password_change">Сменить пароль</a></li>
					<li><a href="/accounts/logout">Выйти</a></li>
				</ul>
            </div>
            <div class="copyright">
                 &copy;&nbsp;2009&#150;{{ current_year }}&nbsp;Электронная школа
            </div>
        </div>
	</div>
    <div id="content">
		{% block content %}{% endblock %}
	</div>
</body>
</html>